
const getPowerList = {
  resultCode: '0000',
  resultMessage: '成功！',
  data: {
    list: [{
      powerCode: '45',
      powerName: '管理员',
      powerArr: [
        { menuId: '1', menuName: '帐号管理' },
        { menuId: '2', menuName: '商品管理' },
        { menuId: '3', menuName: '订单管理' }
      ]
    },
    {
      powerCode: '50',
      powerName: '提货员',
      powerArr: [
        { menuId: '1', menuName: '帐号管理' },
        { menuId: '2', menuName: '商品管理' }
      ]
    }]
  }
}

const addPower = {
  resultCode: '0000',
  resultMessage: '成功！',
  data: {
    message: '创建成功'
  }
}

const removePower = {
  resultCode: '0000',
  resultMessage: '成功！',
  data: {
    message: '删除成功'
  }
}
export default [
  // 获取权限列表
  {
    url: '/power/list',
    type: 'get',
    response: config => {
      return getPowerList
    }
  },
  // 添加/修改角色
  {
    url: '/power/save',
    type: 'get',
    response: config => {
      return addPower
    }
  },
  {
    url: '/power/delete',
    type: 'get',
    response: config => {
      return removePower
    }
  }
]
